package com.heima.feign.api.statics;
import com.heima.feign.config.FeignConfiguration;
import com.heima.model.aritlce.dto.ArticleDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "leadnews-static", configuration = FeignConfiguration.class)
public interface StaticFeignClient {

    /**
     * 生成静态页
     * @param id
     * @param dto
     * @return
     */
    @PostMapping(path = "/article/static/{id}")
    ResponseResult<String> generateHtml(@PathVariable("id") Long id, @RequestBody ArticleDto dto);
}